<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>信息操作页面</title>
<link type="text/css" media="screen" charset="utf-8" rel="stylesheet" href="template/default/content/css/style.account-1.1.css" />
<link charset="utf-8" rel="stylesheet" href="template/default/content/css/personal.record-1.0.css" media="all" />
<style type="text/css"> 
.tip-faq{
	clear:both;
	margin-top:0px;
}
#J-table-consume{
	margin-bottom:40px;
}
.ui-form-tips .m-cue{
	 background-position: -27px -506px;
	 *background-position: -27px -505px;
}
#J-set-date a{
	font-family:宋体;
}
</style>
<script type="text/javascript" charset="utf-8" src="template/default/content/js/arale.js"></script>
<script charset="utf-8" src="template/default/content/js/recordIndex.js?t=20110523"></script>
<script language="javascript" type="text/javascript" src="template/default/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="template/default/content/js/common.js"></script>
<script language="javascript" type="text/javascript" src="DatePicker/WdatePicker.js"></script>
<script type="text/javascript"> 
E.onDOMReady(function() {

	record = new AP.widget.Record({
		dom: {
			queryForm : "queryForm",
			searchForm : "topSearchForm",
			keyword : "J-keyword",
			keywordType : "J-keyword-type"
		}
	});

	//切换高级筛选状态
	E.on('J-filter-link', 'click', record.switchFilter);
});
function show_help()
{
   mytop=(screen.availHeight-430)/2;
   myleft=(screen.availWidth-800)/2;
   window.open("admin.php?ac=view&fileurl=help&helpid=<?=$ac?>","","height=470,width=800,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
</script>
</head>
<!--[if lt IE 7]><body class="ie6"><![endif]--><!--[if IE 7]><body class="ie7"><![endif]--><!--[if IE 8]><body class="ie8"><![endif]--><!--[if !IE]><!--><body><!--<![endif]-->
<div id="container" class="ui-container">
 
<div id="content" class="ui-content fn-clear" coor="default" coor-rate="0.02">
	<div class="ui-grid-21" coor="content">
		<div class="ui-grid-21 ui-grid-right record-tit" coor="title">
			<h2 class="ui-tit-page">工作流信息列表</h2>
			<div class="record-tit-link">
				<a href="#" onClick="show_help()">使用帮助文档？</a>
				<span class="ui-separator-pd">|</span>
			<a href="http://bbs.515158.com/" target="_blank">使用遇到问题？</a>			</div>
			<div class="record-tit-amount">
				<p>总共有<span class="number"><?=public_number('workclass')?></span>条数据
              </p>
			</div>
		</div>

 <!-- 过滤表单 -->
<form method="get" action="admin.php" name="save" class="ui-grid-21 ui-grid-right ui-form">
		<input type="hidden" name="ac" value="<?=$ac?>" />
		<input type="hidden" name="do" value="list" />
		<input type="hidden" name="fileurl" value="<?=$fileurl?>" />
		<input type="hidden" name="userkeytype" value="<?=$userkeytype?>" />
		<div class="ui-grid-21 ui-grid-right record-search">
			<div class="record-search-cate">
				<div class="ui-form-item">
					<div class="ui-form-item-content record-type-list blue-links"  style="width:98%;">
按类别：
<?foreach ($classlist as $row) {?>
<a href="admin.php?ac=<?=$ac?>&fileurl=<?=$fileurl?>&workclasstype=<?=$row[id]?>&userkeytype=<?=$userkeytype?>" <?php if(trim($workclasstype)==trim($row[id])){?>class="active"<? }?> ><?=$row[title]?></a>
<?}?>
<br>
按模板：
<?foreach ($typelist as $row) {?>
<a href="admin.php?ac=<?=$ac?>&fileurl=<?=$fileurl?>&worktemplate=<?=$row[id]?>&userkeytype=<?=$userkeytype?>" <?php if(trim($worktemplate)==trim($row[id])){?>class="active"<? }?> ><?=$row[title]?></a>
<?}?>
					</div>
				</div>
	
							</div>
			<div id="J-advanced-filter-option" class="">
				<div class="record-search-time fn-clear">
					<div class="ui-form-item ui-form-item-time">
					
					<label class="ui-form-label" for="keyword">流水单号：</label>
							<div id="J-keyword-type-select" class="ui-form-select-shell">
								<input type="text" value="<?=urldecode($number)?>" name="number" class="ui-input search-keyword" id="J-keyword">
							</div>
					
						<label class="ui-form-label" for="J-start">起止日期：</label>
						<div class="ui-form-content">
							<input type="text" value="<?=$vstartdate?>"  class="ui-input i-date" readonly="readonly"  onClick="WdatePicker();" name='vstartdate' > - <input type="text" value="<?=$venddate?>"  class="ui-input i-date" readonly="readonly"  onClick="WdatePicker();" name='venddate' >
						</div>
						<div class="submit-time-container ">
							<div class="submit-time ui-button ui-button-sorange">
								<input type="submit" class="ui-button-text"id="J-submit-time" value="查 找"/>
							</div>
						</div>
						<div id="J-set-date" class="quick-link-date  blue-links  ">
						
							<a href="admin.php?ac=<?=$ac?>&fileurl=<?=$fileurl?>&ischeck=1" seed="CR-today" id="J-today" >今天</a>
							<a href="admin.php?ac=<?=$ac?>&fileurl=<?=$fileurl?>&ischeck=2" seed="CR-sevenday" id="J-seven-day">3天以内</a>
							<a href="admin.php?ac=<?=$ac?>&fileurl=<?=$fileurl?>&ischeck=3" seed="CR-month" id="J-a-month" >7天以内</a>
							<a href="admin.php?ac=<?=$ac?>&fileurl=<?=$fileurl?>&ischeck=4" seed="CR-month" id="J-a-month" >1个月内</a>
							<a href="admin.php?ac=<?=$ac?>&fileurl=<?=$fileurl?>&ischeck=5" seed="CR-month" id="J-a-month" >6个月内</a>
						</div>
					</div>
					<a href="javascript:;"  seed="CR-AdvancedFilter" id="J-filter-link" class="ui-btn-white-mini-more">更多选项</a>
									</div>
				
				<div class="record-search-option fn-clear">
					<div class="record-search-option-keyword  fn-hide  fn-clear">
						<div class="ui-form-item fn-left" id="J-keyword-type-outer" style="width:100%;">
						
							<label class="ui-form-label" for="keyword">名称：</label>
							<div id="J-keyword-type-select" class="ui-form-select-shell">
								<input type="text" value="<?=urldecode($title)?>" name="title" class="ui-input search-keyword" id="J-keyword">
							</div>
							
					
	
						</div>
						<div id="J-filter-condition-left" class="record-search-left fn-left"> </div>
					</div>
					<div id="J-filter-condition-right" class="record-search-right  fn-hide "></div>
				</div>
				<div id="J-submit-form" class="record-search-submit  fn-hide ">
					<div class="ui-button ui-button-sorange">
						<input type="submit" class="ui-button-text"id="J-submit-time" value="查 找"/>
					</div>
					<input type="hidden" value="1" id="J-filter" />
					<input type="hidden" name="record-type" id="J-record-type" value="0" />

				</div>
				<div class="ui-form-tips">
															
										<div class="m-error fn-hide" id="J-form-tips">
					</div>
 
					</div>
			</div>
		</div><!-- .record-search -->
		</form>

		<div class="ui-grid-21 ui-grid-right fn-clear" coor="total">
		   <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                          <tr>
                                            <td width="91%">
											<?=showpage($num,$pagesize,$page,$url)?></td>
                                            <td width="9%" align="right" style="padding-right:10px;"><input type="button" value="新建流程" class="BigButtonBHover" onClick="javascript:window.location='admin.php?ac=workadd&fileurl=work'"></td>
                                          </tr>
                                        </table>
		  
										

	  </div>
	</div>
	<form name="excel" method="post" action="admin.php?ac=<?=$ac?>&fileurl=<?=$fileurl?>">
		<input type="hidden" name="do" value="excel" />
		<input type="hidden" name="ischeck" value="<?=$ischeck?>" />
		<input type="hidden" name="vstartdate" value="<?=$vstartdate?>" />
		<input type="hidden" name="venddate" value="<?=$venddate?>" />
		<input type="hidden" name="number" value="<?=$number?>" />
		<input type="hidden" name="workclasstype" value="<?=$workclasstype?>" />
		<input type="hidden" name="worktemplate" value="<?=$worktemplate?>" />
		<input type="hidden" name="title" value="<?=$title?>" />
		<input type="hidden" name="userkeytype" value="<?=$userkeytype?>" />
		</form>
	<form name="update" method="post" action="admin.php?ac=<?=$ac?>&fileurl=<?=$fileurl?>">
		<input type="hidden" name="do" value="update" />
		<div class="ui-grid-21 ui-grid-right fn-clear" id="J-table-consume" coor="consumelist">
			<div class="ui-tab">
												<div class="ui-tab-trigger"> 
					<ul class="fn-clear"> 
<li class="ui-tab-trigger-item  ui-tab-trigger-item-current">
<a href="admin.php?ac=<?=$ac?>&fileurl=<?=$fileurl?>" class="ui-tab-trigger-text">我的申请</a></li>	
<li class="ui-tab-trigger-item">
<a href="admin.php?ac=workkey&fileurl=work&type=3" class="ui-tab-trigger-text">待我审批</a></li>
<li class="ui-tab-trigger-item">
<a href="admin.php?ac=workkey&fileurl=work&type=1" class="ui-tab-trigger-text">经我审批</a></li>					
</ul>
				</div>
 
				<div class="ui-tab-container" id="myScene">
					<div class="ui-tab-container-item ui-tab-container-item-current">
					<div class="amount-scheme-a fn-clear">
<div class="fn-left"><?=get_user_ui($_USER->id,'admin.php?ac='.$ac.'&fileurl='.$fileurl.'&userkeytype=1&ischeck='.$ischeck.'&vstartdate='.$vstartdate.'&venddate='.$venddate.'&number='.$number.'&workclasstype='.$workclasstype.'&worktemplate='.$worktemplate.'&title='.$title.'')?></div>
<div class="fn-right">
<?=get_excel_down('excel_9')?>
<!--<img class="v-al-middle" src="template/default/images/2EDkuGH6eX.gif" />
										<a id="J-show-amount"  unselectable="on" onselectstart="return false;" href="javascript:;" seed="CR-statistical-top">统计报表</a> --></div>
</div>
					
					
					
						<table id="tradeRecordsIndex" class="ui-table">

							<thead>
								<tr>
									<th class="checkbox">
									<input type="checkbox" class="checkbox" value="1" name="chkall" onClick="check_all(this)" /></th>
									<th class="info">流水单号</th>
									<th class="info">流程类型</th>
									<th class="title">工作流名称</th>
									<th class="info">申请人</th>
									<th class="info">申请时间</th>
									<th class="info">审批步骤</th>
									<th class="action">操作</th>
								</tr>
							</thead>
							
							
							
							
							<tbody>
<?foreach ($result as $row) {?>
																																								
<tr <?php if($result%2==0){?>class="split" <?php }?>>
<td class="checkbox">
<?php
get_checkbox_list_key("id[]",$row['id'],$row['uid'],$_USER->id);
?></td>
<td class="info"><?=$row['number']?></td>
<td class="info"><?=get_inc_user_types($row['worktemplate'])?></td>
<td class="title">
<a href="admin.php?ac=views&fileurl=work&id=<?=$row['id']?>"><?=$row['title']?></a>
</td>
<td class="info"><?=GET_INC_USER_NAME($row['uid'])?></td>
<td class="info"><?=$row['date']?></td>
<td class="info">
<?php
if($row["type"]=='1'){
echo '己结束';
}else{

$blog = $db->fetch_one_array("SELECT * FROM ".DB_TABLEPRE."workclass_personnel WHERE workclassid='".$row["id"]."' and unionid='".union_id."'  ORDER BY id desc LIMIT 1");
if($blog["id"]!=''){
	if($blog["flowid"]!=''){
		$flow = $db->fetch_one_array("SELECT title,number FROM ".DB_TABLEPRE."workclass_flow WHERE id='".$blog["flowid"]."' and unionid='".union_id."' ORDER BY id desc LIMIT 1");
		echo '第'.$flow["number"].'步：'.$flow["title"];
	}else{
		echo '自由流程';
	}


}else{
	echo '流程设置错误';
}
}
?>
</td>
<td class="action">
<a href="#" onClick="window.open ('admin.php?ac=views&do=flow&fileurl=work&id=<?=$row['id']?>', 'newwindow', 'height=500, width=500, top=50, left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no')">查看审批记录</a>
</td>
									
</tr>
<?}?>			
																									
</tbody>
		</table>
 
											</div>
					
					<div class="fn-clear">
						<!-- 图释 -->
					  <div class="iconTip fn-left" style="padding-left:15px;">
					<input type="checkbox" class="checkbox" value="1" name="chkall" onClick="check_all(this)" /> 全选
						  &nbsp;
						  <a class="js-add-contact"><span></span></a>
						  <a href="javascript:document:update.submit();">删除数据</a>
</div>
						
												<div class="page page-nobg fn-right">
							<span class="page-link"><?=showpage($num,$pagesize,$page,$url)?></span>
						</div>
						<!-- /分页 -->
											</div>
				</div>
			</div>
 
		
		</div>
		
 </form>		
	</div>
 
 
	
</div>


</div>

                            

</body>
</html>
 

